package com.qualityevaluationclouduser.service;


import com.alibaba.fastjson.JSONObject;
import com.qualityevaluationclouduser.entity.MenuInfo;
import com.qualityevaluationclouduser.entity.RoleInfo;
import com.qualityevaluationclouduser.entity.UserInfo;
import org.springframework.data.domain.Page;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

/**
 * @program: qualityEvaluationCloudProject
 * @description: 用户信息业务接口
 * @author:
 * @create:
 **/
public interface UserInfoService {
    UserInfo findByName(String name);
    UserInfo addUserInfo(UserInfo UserInfo,Long roleId);
    void delUserInfo(String id);
    UserInfo modifyUserInfo(UserInfo UserInfo);
    List<UserInfo> findAllUserInfos();
    //赋权
    void empower(String UserInfoId, String roleId);
    //注册
    UserInfo register(MultipartFile file, UserInfo UserInfo, Long roleId) throws IOException;
    //单独修改头像
    void editPicture(MultipartFile file, UserInfo UserInfo) throws IOException;
    //分页查询
    Page<UserInfo> pageQueryUserInfoList(int page, int size);
    //修改头像
    JSONObject editPicture(MultipartFile file, Long userId) throws IOException;
    //重置密码
    boolean resetPassword(String id,String password,String newPassword);
    //修改状态
    boolean changeState(Long UserInfoId);

    void updatePassword(JSONObject jsonObject);
    //邮箱
    boolean findEmailCode(JSONObject jparms);

    void deleteUserInfosByIdIn(List<Long> ids);
    //根据账号，性别，用户状态分页查询
    Page<UserInfo> pageQueryByAccountAndGenderAndStatus(String username, String gender, String mobile, String identifyCode,String version,String status,int page, int size);

    List<MenuInfo> queryMenuInfoListByUser(Long userId);

    List<MenuInfo> queryMenuInfoListByRole(Long roleId);

    RoleInfo queryRoleInfoByUser(Long userId);

    Page<UserInfo> queryUserListByRole(Long userId,int page,int size);
}
